home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Communications / General / Supra ARA1.0 2⁄23⁄94 / SFM v32bis-ATZ < prev    next >
Text File  |  1993-03-22  |  4KB  |  206 lines

  1. ! "SFM V32bis-ATZ  - 3/22/93"
  2. !  Sets SFM to do a reset instead of &F1, serial-19.2K, hardware flow
  3. !
  4. !         3/22/93  MAW - added pause to fix PB wakeup
  5.  
  6. @ORIGINATE
  7. @ANSWER
  8. !
  9. @LABEL 1
  10. serreset 19200, 0, 8, 1
  11.  
  12. !
  13. ! first recall the factory configuration, and get the modem in enhanced command state
  14. !
  15. ! For SupraPB modems so that they wake up in time to receive commands
  16. pause 30
  17. matchclr
  18. matchstr 1 4 "OK\13\10"
  19. write "AT Z \13"
  20. matchread 30
  21. jump 59
  22. !
  23. ! Next, Set up the configuration:
  24. !                Turn off auto answer and echo
  25. !
  26. @LABEL 4
  27. pause 5
  28. matchstr 1 6 "OK\13\10"
  29. !write "AT S0=0 E0 \13"  Do not want to override NOVRAM
  30. write "AT E0 \13"
  31. matchread 30
  32. jump 59
  33. !
  34. ! If speaker on flag is true, 
  35. @LABEL 6
  36. ifstr 2 8 "1"
  37. matchstr 1 8 "OK\13\10"
  38. write "AT M0\13"
  39. matchread 30
  40. jump 59
  41. !
  42. ! The modem is ready so enable answering, or originate a call
  43. !
  44. @LABEL 8
  45. pause 5
  46. ifANSWER 30
  47. note "Dialing ^1" 3
  48. !write "AT S0=0 DT^1\13"   Do not want to over ride NOVRAM settings
  49. write "AT DT^1\13"   
  50. !
  51. @LABEL 9
  52. matchstr 1 11 "CARRIER 1200\13\10"
  53. matchstr 2 12 "CARRIER 2400\13\10"
  54. matchstr 3 13 "CARRIER 4800\13\10"
  55. matchstr 4 14 "CARRIER 7200\13\10"
  56. matchstr 5 15 "CARRIER 9600\13\10"
  57. matchstr 6 16 "CARRIER 12000\13\10"
  58. matchstr 7 17 "CARRIER 14400\13\10"
  59. matchstr 8 50 "NO CARRIER\13\10"
  60. matchstr 9 50 "ERROR\13\10"
  61. matchstr 10 52 "NO DIALTONE\13\10"
  62. matchstr 11 53 "BUSY\13\10"
  63. matchstr 12 54 "NO ANSWER\13\10"
  64. matchread 700
  65. jump 59
  66. !
  67. @LABEL 11
  68. note "Communicating at 1200 bps." 2
  69. CommunicatingAt 1200
  70. jump 20
  71. !
  72. @LABEL 12
  73. note "Communicating at 2400 bps." 2
  74. CommunicatingAt 2400
  75. jump 20
  76. !
  77. @LABEL 13
  78. note "Communicating at 4800 bps." 2
  79. CommunicatingAt 4800
  80. jump 20
  81. !
  82. @LABEL 14
  83. note "Communicating at 7200 bps." 2
  84. CommunicatingAt 7200
  85. jump 20
  86. !
  87. @LABEL 15
  88. note "Communicating at 9600 bps." 2
  89. CommunicatingAt 9600
  90. jump 20
  91. !
  92. @LABEL 16
  93. note "Communicating at 12000 bps." 2
  94. CommunicatingAt 12000
  95. jump 20
  96. !
  97. @LABEL 17
  98. note "Communicating at 14400 bps." 2
  99. CommunicatingAt 14400
  100. jump 20
  101. !
  102. ! Now CONNECTed.  Change to Hardware Handshaking
  103. @LABEL 20  
  104. HSReset 0 1 0 0 0 0
  105. ifANSWER 22
  106. pause 30
  107. !
  108. ! Finished. Return with good results
  109. @LABEL 22
  110. exit 0
  111. !
  112. ! @ANSWER
  113. ! Set up the modem to answer
  114. @LABEL 30
  115. !write "ATS0=1\13"  Since we are doing an ATZ, we are allowing S0 to be in nov
  116. write "AT\13"
  117. matchstr 1 31 "OK\13\10"
  118. matchread 30
  119. jump 59
  120. !
  121. @LABEL 31
  122. matchstr 1  32 "RING\13\10"
  123. matchstr 2  11 "CARRIER 1200\13\10"
  124. matchstr 3  12 "CARRIER 2400\13\10"
  125. matchstr 4  13 "CARRIER 4800\13\10"
  126. matchstr 5     14 "CARRIER 7200\13\10"
  127. matchstr 6  15 "CARRIER 9600\13\10"
  128. matchstr 7     16 "CARRIER 12000\13\10"
  129. matchstr 8  17 "CARRIER 14400\13\10"
  130. matchstr 9  50 "NO CARRIER\13\10"
  131. matchstr 10    50 "ERROR\13\10"
  132. matchstr 11    52 "NO DIALTONE\13\10"
  133. matchstr 12    53 "BUSY\13\10"
  134. matchstr 13 54 "NO ANSWER\13\10"
  135. matchread 700
  136. jump 31
  137. !
  138. @LABEL 32
  139. userhook 1
  140. note "Answering phone…" 2
  141. jump 31
  142. !
  143. ! 50: error messages
  144. !
  145. @LABEL 50
  146. exit -6021
  147. !
  148. @LABEL 52
  149. exit -6020
  150. !
  151. @LABEL 53
  152. exit -6022
  153. !
  154. @LABEL 54
  155. exit -6023
  156. !
  157. @LABEL 59
  158. exit -6019
  159. !
  160. ! Hang up the modem
  161. !
  162. @HANGUP
  163. @LABEL 60
  164. settries 0
  165. HSReset 0 0 0 0 0 0 
  166. @LABEL 61
  167. write "ATH\13"
  168. matchclr
  169. matchstr 1 62 "NO CARRIER\13\10"
  170. matchstr 2 62 "OK\13\10"
  171. matchstr 3 62 "ERROR\13\10"
  172. matchread 30
  173. inctries
  174. iftries 3 62
  175. ! no response, try escape sequence
  176. pause 12
  177. write "+++"
  178. matchclr
  179. matchstr 1 61 "OK\13\10"
  180. matchread 18
  181. ! try dropping DTR
  182. DTRClear
  183. pause 15
  184. DTRSet
  185. pause 15
  186. jump 61
  187. !
  188. @LABEL 62
  189. ! recall the factory settings
  190. pause 15
  191. write "ATZ\13"
  192. matchclr
  193. matchstr 1 63 "OK\13\10"
  194. matchread 30
  195. !
  196. @LABEL 63
  197. pause 5
  198. matchstr 1 64 "OK\13\10"
  199. write "ATS0=0\13"  
  200. matchread 20
  201. !
  202. @LABEL 64
  203. exit 0
  204.  
  205.